import React, { Component } from 'react'

import { Picker, List, WhiteSpace } from 'antd-mobile';




import '../assets/style/picker.less'
export default class picker extends Component {
    constructor(props) {
        super(props)
        this.state = {
            sValue: [],
            priceValue: [],
            genreValue: [],
        }
        this.Change = this.Change.bind(this)
        this.PickerChange = this.PickerChange.bind(this)
        this.Ok = this.Ok.bind(this)
        this.houseType = this.houseType.bind(this)
    }
    Change(e) {
        console.log(e, 11111111)
    }
    PickerChange(e) {
        console.log(e, 22222222)
    }
    Ok(e) {
        console.log(e, 33333333)
        this.setState({ sValue: e })
    }
    houseType(e) {
        this.setState({ genreValue: e })
        console.log(e)
    }

    render() {
        console.log(this.props.parent.state, '000000000')


        return (
            <div className="pickers">
                <Picker
                    title="区域"
                    extra="请选择"
                    data={this.props.parent.state.area}
                    value={this.props.parent.state.sValue}
                    onChange={v => console.log(v)}
                    onOk={v => this.props.parent.getareaChildrenMsg(v)}
                >
                    <List.Item arrow="horizontal"></List.Item>
                </Picker>
                <Picker extra="价格"
                    data={this.props.parent.state.price}
                    cols={1}
                    title="价格"
                    value={this.props.parent.state.priceValue}
                    onOk={e => this.props.parent.getpriceChildrenMsg(e)}
                    onDismiss={e => console.log('dismiss', e)}
                >
                    <List.Item arrow="horizontal"></List.Item>
                </Picker>
                <Picker extra="类型"
                    data={this.props.parent.state.data1}
                    cols={1}
                    value={this.props.parent.state.genreValue}
                    title="类型"
                    // onOk={e => this.houseType(e)}
                    onOk={e => this.props.parent.getChildrenMsg(e)}
                    onDismiss={e => console.log('dismiss', e)}
                >
                    <List.Item arrow="horizontal"></List.Item>
                </Picker>


            </div>
        )
    }
}









